import tpl from './index.tpl'
import './style.scss'
import {addEvent, removeEvent} from "../../utils/tool";
export default {
  name: 'TabNav',
  render(){
    return tpl()
  },
  bindClick: (el)=>{
    addEvent(el, 'click', handleChange)
  },
}
function handleChange(e){
  let target = e.target
  if(target.hasAttribute('href')){
    target.parentNode.style.setProperty('--k', target.style.getPropertyValue('--i'))
  }
}
